package com.ruoyi.service.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.ServiceOpenMapper;
import com.ruoyi.service.domain.ServiceOpen;
import com.ruoyi.service.service.IServiceOpenService;

/**
 * 公开信息Service业务层处理
 * 
 * @author yepanpan
 * @date 2025-04-21
 */
@Service
public class ServiceOpenServiceImpl implements IServiceOpenService 
{
    private static final Logger log = LoggerFactory.getLogger(ServiceOpenServiceImpl.class);

    @Autowired
    private ServiceOpenMapper serviceOpenMapper;
    /**
     * 查询公开信息
     * 
     * @param id 公开信息主键
     * @return 公开信息
     */
    @Override
    public ServiceOpen selectServiceOpenById(Long id)
    {
        return serviceOpenMapper.selectServiceOpenById(id);
    }

    /**
     * 查询公开信息列表
     * 
     * @param serviceOpen 公开信息
     * @return 公开信息
     */
    @Override
    public List<ServiceOpen> selectServiceOpenList(ServiceOpen serviceOpen)
    {
        return serviceOpenMapper.selectServiceOpenList(serviceOpen);
    }

    /**
     * 新增公开信息
     * 
     * @param serviceOpen 公开信息
     * @return 结果
     */
    @Override
    public int insertServiceOpen(ServiceOpen serviceOpen)
    {
        serviceOpen.setCreateTime(DateUtils.getNowDate());
        return serviceOpenMapper.insertServiceOpen(serviceOpen);
    }

    /**
     * 修改公开信息
     * 
     * @param serviceOpen 公开信息
     * @return 结果
     */
    @Override
    public int updateServiceOpen(ServiceOpen serviceOpen)
    {
        serviceOpen.setUpdateTime(DateUtils.getNowDate());
        return serviceOpenMapper.updateServiceOpen(serviceOpen);
    }

    /**
     * 批量删除公开信息
     * 
     * @param ids 需要删除的公开信息主键
     * @return 结果
     */
    @Override
    public int deleteServiceOpenByIds(Long[] ids)
    {
        return serviceOpenMapper.deleteServiceOpenByIds(ids);
    }

    /**
     * 删除公开信息信息
     * 
     * @param id 公开信息主键
     * @return 结果
     */
    @Override
    public int deleteServiceOpenById(Long id)
    {
        return serviceOpenMapper.deleteServiceOpenById(id);
    }

}
